﻿Imports System.Windows.Forms
Imports System.Xml
Public Class SetariWindowClass
    Public XMLDoc As New XmlDataProvider

    Private Sub Button_Click_1(sender As Object, e As RoutedEventArgs)
        Dim SelectFolderDialog As New FolderBrowserDialog
        SelectFolderDialog.ShowDialog()
        FolderTextBox.Text = SelectFolderDialog.SelectedPath

    End Sub


    Private Sub Window_Closing_1(sender As Object, e As System.ComponentModel.CancelEventArgs)
        e.Cancel = True
        Me.Hide()

    End Sub

    Private Sub TextBox_GotFocus_1(sender As Object, ByVal e As RoutedEventArgs)
        NewNumeTextBox.Text = ""
    End Sub

    Private Sub TextBox_GotFocus_2(sender As Object, e As RoutedEventArgs)
        NewSerieTextBox.Text = ""
    End Sub

    Private Sub TextBox_LostFocus_1(sender As Object, e As RoutedEventArgs)
        If NewNumeTextBox.Text = "" Then
            NewNumeTextBox.Text = "Nume Autorizat"
        End If
    End Sub

    Private Sub TextBox_LostFocus_2(sender As Object, e As RoutedEventArgs)
        If NewSerieTextBox.Text = "" Then
            NewSerieTextBox.Text = "Serie Autorizat"
        End If
    End Sub

    Private Sub Button_Click_2(sender As Object, e As RoutedEventArgs)
        If NewNumeTextBox.Text <> "Nume Autorizat" Then
            Dim XMLDoc1 As New XmlDocument
            Dim AutNode As XmlNode
            AutNode = XMLDoc1.SelectSingleNode("/autorizati")
            'AutNode.AppendChild()
            'rewrwrwer
        End If
    End Sub
End Class
